package code

import "fmt"

// goto
func ProcessOther1() {
	if 20 > 10 {
		goto GotoTag1
	}
	return
GotoTag1:
	fmt.Println("tag1")
	if 10 > 5 {
		goto GotoTag2
	}
GotoTag2:
	fmt.Println("tag2")
}

// break
func ProcessOther2() {
OuterLoop:
	for i := 0; i < 2; i++ {
		for j := 0; j < 5; j++ {
			switch j {
			case 2:
				fmt.Println(i, j)
				break OuterLoop
			case 3:
				fmt.Println(i, j)
				break OuterLoop
			}
		}
	}
}

func ProcessOther3() {
OuterLoop:
	for i := 0; i < 2; i++ {
		for j := 0; j < 5; j++ {
			switch j {
			case 2:
				fmt.Println(i, j)
				continue OuterLoop
			}
		}
	}
}
